package day07;

public class Person {
    private String name1;
    private int age;
    public String name2;
    public String nam3;

    public Person() {
    }

    private Person(String tel) {

    }

    public Person(String name1, int age, String name2, String nam3) {
        this.name1 = name1;
        this.age = age;
        this.name2 = name2;
        this.nam3 = nam3;
    }

    public String getName1() {
        return name1;
    }

    public void setName1(String name1) {
        this.name1 = name1;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getName2() {
        return name2;
    }

    public void setName2(String name2) {
        this.name2 = name2;
    }

    public String getNam3() {
        return nam3;
    }

    public void setNam3(String nam3) {
        this.nam3 = nam3;
    }

    public void eat(int n) {
        System.out.println("吃了" + n + "袋大米！！");
    }

    public void play(String num) {
        System.out.println("今天打了" + num + "场球赛");
    }

    private void drink() {
        System.out.println("今天喝了5瓶可口可乐！");
    }

    private void pay(Double money) {
        System.out.println("今天花了" + money + "元");
    }

    @Override
    public String toString() {
        return "Person{" +
                "name1='" + name1 + '\'' +
                ", age=" + age +
                ", name2='" + name2 + '\'' +
                ", nam3='" + nam3 + '\'' +
                '}';
    }
}
